package com.wbs.api;

import com.wbs.model.TbItem;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author: 芝梦
 * @Description: 商品远程调用
 * @DateTime: 2024/2/26 21:16
 */
@FeignClient("dongdong-seller-service")
public interface ItemAPI {
    @GetMapping("/item/selectBySkuId")
    public TbItem selectBySkuId(@RequestParam Long skuId);

    //更新库存数量
    @PostMapping("/item/updateStockQuantities")
    public void updateStockQuantities(@RequestBody List<TbItem> items);
}
